/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 *
 * @author rufersic
 */
public class ExpresionRegular {
    public static  boolean expersionIsGenerada(String expresion,String regex){
     // String regex = "^(a|b)*(abb)+$";
    Pattern pattern = Pattern.compile(regex);
    Matcher matcher = pattern.matcher(expresion);
    return matcher.matches();
    
    }
}
